package org.atguigu.spring6.resource.service;

import jakarta.annotation.Resource;
import org.atguigu.spring6.resource.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Service(value = "myUserService")
public class UserServiceImpl implements UserService {

    //根据名称进行注入

    //不指定名称，就根据属性名称进行注入
    @Resource
    private UserDao myUserDao;


    public void add()
    {
        System.out.println("myUserService add....");
        myUserDao.add();
    }

}
